Empty helpers did try to draw a NULL paintable (not good) and in the
non-null case code used the wrong width/height.
default:
{
double image_ratio = (double) width / height;
- double ratio = gdk_paintable_get_intrinsic_aspect_ratio (self->paintable);
+ double ratio;
double x, y, w, h;
+ if (self->paintable == NULL)
+ break;
+
+ ratio = gdk_paintable_get_intrinsic_aspect_ratio (self->paintable);
if (ratio == 0)
{
w = width;
gtk_css_style_snapshot_icon_paintable (style,
snapshot,
self->paintable,
- width, height,
+ w, h,
self->texture_is_symbolic);
gtk_snapshot_offset (snapshot, -x, -y);
}